<template>
  <div class="login-container">
    <el-form ref="form" :model="user" class="login-form">
      <p>用户登录</p>
      <el-form-item>
        <el-input v-model="user.name" placeholder="请输入账号"></el-input>
      </el-form-item>
      <el-form-item>
        <el-input v-model="user.name" placeholder="请输入密码"></el-input>
      </el-form-item>

      <el-form-item>
        <el-button class="login-btn" type="primary" @click="onSubmit">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    name: 'Login',
    components: {},
    data() {
      return {
        user: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>
<style scoped lang="less">
  .login-container {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("./login.jpg") no-repeat;
    background-size: cover;
  }
  .login-form {
    background-color: #fff;
    padding: 50px;
    min-width: 250px;
  }

  .login-btn {
    width: 100%;
  }
</style>
